

package top.continew.admin.question.mapper.question;

import org.apache.ibatis.annotations.Param;
import top.continew.admin.question.manger.service.model.*;
import top.continew.admin.question.model.QuestionSetInfo;
import top.continew.admin.question.model.question.Question;
import top.continew.starter.data.mp.base.BaseMapper;

import java.util.List;

public interface QuestionMapper extends BaseMapper<Question> {
    List<QuestionVO> getList(@Param("param") QueryQuestion queryQuestion, @Param("teacherId") Long teacherId);

    List<TestStructureQuestionVO> getQuestionByQuestionSet(long questionSetId);

    List<StatisticalTeacherVo> statisticalTeacher(@Param("startTime") Long startTime,
                                                  @Param("endTime") Long endTime,
                                                  @Param("teacherId") Long teacherId);

    List<QuestionVO> getListQuestionManager(@Param("query") QuestionQuery query);

    List<StatisticalTeacherVo> statisticalTeacherLeft(@Param("startTime") Long startTime,
                                                      @Param("endTime") Long endTime,
                                                      @Param("teacherId") Long teacherId);

    List<StatisticalTeacherInfoVo> statisticalTeacherRight(@Param("teacherIds") List<Long> teacherIds,
                                                           @Param("startTime") Long startTime,
                                                           @Param("endTime") Long endTime);

    List<StatisticalTeacherInfoVo> statisticalTeacherExamTypeRight(@Param("teacherIds") List<Long> teacherIds,
                                                                   @Param("startTime") Long startTime,
                                                                   @Param("endTime") Long endTime);

    Long getQuestionUp(@Param("questionId") Long questionId,
                       @Param("activeName") String activeName,
                       @Param("teacherId") Long teacherId);

    Long getQuestionDown(@Param("questionId") Long questionId,
                         @Param("activeName") String activeName,
                         @Param("teacherId") Long teacherId);

    Long isSelectYwQuestionPermissions(@Param("userId") Long userId);

    Long isSelectSxQuestionPermissions(@Param("userId") Long userId);

    void rejectReviewMultiple(@Param("ids") List<Long> ids, @Param(value = "time") Long time);

    void rejectCheckMultiple(@Param("ids") List<Long> ids, @Param(value = "time") Long time);

    List<SpotCheckQuestionVO> getSpotCheckQuestionList(QuerySpotCheckQuestion querySpotCheckQuestion);

    SpotCheckQuestionSum getSpotCheckQuestionSum(QuerySpotCheckQuestion querySpotCheckQuestion);

    List<SpotCheckQuestion> querySampleQuestion(SpotCheck spotCheck);

    void changeQualified(@Param("questionIds") List<Long> questionIds,
                         @Param("qualifiedStatus") String qualifiedStatus);

    void updateOfficialQuestion(@Param("id") Long id,
                                @Param("isOfficialQuestion") String isOfficialQuestion,
                                @Param("officialQuestionSource") String officialQuestionSource,
                                @Param("year") String year);

    List<QuestionSetInfo> queryUseSection();

    /**
     * 章节题目量
     */
    Integer queryQuestionSetSum(String sectionId);
}
